package com.buba.other.service.impl;

import com.buba.other.data.dto.MedicalRecordsDto;
import com.buba.other.data.dto.MedicalRecordsDetailsDto;
import com.buba.pojo.other.MedicalRecords;
import com.buba.other.mapper.MedicalRecordsMapper;
import com.buba.other.service.MedicalRecordsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.buba.pojoVo.MedicalRecordsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 病历表 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2022-06-09
 */
@Service
public class MedicalRecordsServiceImpl extends ServiceImpl<MedicalRecordsMapper, MedicalRecords> implements MedicalRecordsService {
    @Autowired
    private MedicalRecordsMapper mrMapper;
    @Override
    public List<MedicalRecordsDto> getMedicalRecords(Date startDate, Date endDate, Integer patientId) {
        return mrMapper.getMedicalRecords(startDate,endDate,patientId);
    }

    @Autowired
    private MedicalRecordsMapper medicalRecordsMapper;


    @Override
    public List<MedicalRecordsVo> getBinglis(Integer patientId) {
        return medicalRecordsMapper.getBinglis(patientId);
    }
    @Override
    public MedicalRecordsDetailsDto getMedicalRecordsDetails(Integer id) {
        return mrMapper.getMedicalRecordsDetails(id);
    }
}
